Rails.application.routes.draw do

  match "/user/checkUsernameRepetition" => "user#checkUsernameRepetition", as: :user_checkUsernameRepetition, via: [:get,:post]

  match "/user/first_setting" => "user#first_setting", as: :user_first_setting, via: [:get,:post]
  # match "/user/add_ptracker_token" => "user#add_ptracker_token", as: :user_add_ptracker_token, via: [:get,:post]
  match "/user/setting" => "user#setting", as: :user_setting, via: [:get,:post]
  match "/user/get_projects" => "user#get_projects", as: :user_get_projects, via: [:get,:post]
  match "/user/process_selected_projects" => "user#process_selected_projects", as: :user_process_selected_projects, via: [:get,:post]


  match "/charts_demo" => "user#ChartsDemo", as: :user_charts_demo, via: [ :get,:post]
  match "/user/homepage" => "user#homepage", as: :user_homepage, via: [ :get,:post]
  match "/user/index" => "user#index", as: :user_index, via: [ :get,:post]
  match "/analysis/select_view" => "analysis#select_view", as: :analysis_select_view, via: [ :get,:post]
  match "/analysis/people" => "user#people", as: :user_people, via: [ :get,:post]
  match "/analysis/project" => "user#project", as: :user_project, via: [ :get,:post]

  match "/help" => "user#help", as: :user_help, via: [ :get,:post]


  match "/user/show" => "user#show", as: :user_show, via: [ :get,:post]
  match "/user/login" => "user#login", as: :user_login, via: [ :get,:post]
  match "/user/logout" => "user#logout", as: :user_logout, via: [ :get,:post]
  match "/user/signup" => "user#signup", as: :user_signup, via: [ :get,:post]  
  match "/user/create" => "user#create", as: :user_create, via: [ :get,:post]
  match "/user/change_profile" => "user#change_profile", as: :user_change_profile, via: [ :get,:post]

    match "/user/testgithub" => "user#testgithub", as: :user_testgithub, via: [ :get,:post]


  match "/index" => "p_entries#index", as: :index, via: [ :get,:post]

  resources :p_entries do 
    collection do
      get "grab_entry"
      get "grab_init"
      # get "grab_state_trans"
      get "grab_state_trans_and_github"
      get "preprocess"

    end
  end



  root 'user#homepage'

  mount Resque::Server, :at => "/resque"


  # resources :user do
  # end





  # The priority is based upon order of creation: first created -> highest priority.
  # See how all your routes lay out with "rake routes".

  # You can have the root of your site routed with "root"
  # root 'welcome#index'

  # Example of regular route:
  #   get 'products/:id' => 'catalog#view'

  # Example of named route that can be invoked with purchase_url(id: product.id)
  #   get 'products/:id/purchase' => 'catalog#purchase', as: :purchase

  # Example resource route (maps HTTP verbs to controller actions automatically):
  #   resources :products

  # Example resource route with options:
  #   resources :products do
  #     member do
  #       get 'short'
  #       post 'toggle'
  #     end
  #
  #     collection do
  #       get 'sold'
  #     end
  #   end

  # Example resource route with sub-resources:
  #   resources :products do
  #     resources :comments, :sales
  #     resource :seller
  #   end

  # Example resource route with more complex sub-resources:
  #   resources :products do
  #     resources :comments
  #     resources :sales do
  #       get 'recent', on: :collection
  #     end
  #   end

  # Example resource route with concerns:
  #   concern :toggleable do
  #     post 'toggle'
  #   end
  #   resources :posts, concerns: :toggleable
  #   resources :photos, concerns: :toggleable

  # Example resource route within a namespace:
  #   namespace :admin do
  #     # Directs /admin/products/* to Admin::ProductsController
  #     # (app/controllers/admin/products_controller.rb)
  #     resources :products
  #   end

end
